package com.qf.blog.commons.constants;

/**
 * @author Zhendong Song
 * @date 2023/6/6
 * @description
 */
public interface SysConsts {
    String LOGIN_COOKIE_KEY = "blog-login";
    String VERIFY_CODE="verifyCode";
    int TOKEN_VALID_TIME = 30;
    int RESET_PWD_VALID_TIME = 5;

    String POST = "post"; // 帖子

    String COMMENT = "comment"; // 评论

    interface CookExpireTime {
        int ONE_HOUR = 60 * 60; // 1 hour
        int ONE_DAY = ONE_HOUR * 24; // 1 day
        int ONE_WEEK = ONE_DAY * 7; // 1 week
        int THIRTY_DAYS = ONE_DAY * 30; // 30 days
    }

    interface RedisKeys {
        String USER_LOGIN_TOKEN_KEY = "blog:login:%s";
        String USER_LIKE_KEY = "blog:like:%s:%s";
        String USER_FOLLOWING_KEY = "blog:following:%s";
        String USER_FOLLOWER_KEY = "blog:follower:%s";
        String POST_SCORE_KEY = "blog:post:score";
    }
    interface MesaaggeStatus{
        Integer UNREAD=0;
        Integer READED=1;
    }
}


